<template>
  <xy-material-card :material="material" @click="pushInventoryHandle"></xy-material-card>
</template>

<script>
    import xyMaterialCard from "./MaterialCard";

    /**
     * 物料卡-入库 ，需要跳转至入库界面
     * @author Canaan
     * @date 2019/9/18 14:21.
     */
    export default {
        name: 'inventoryMaterialCard',
        mounted() {

        },
        components: {
            xyMaterialCard
        },
        props: {
            material: {
                type: Object,
                default() {
                    return {
                        id: null,
                        name: null
                    }
                }
            }
        },
        data() {
            return {}
        },
        computed: {},
        methods: {
            /***
             * 入库表单
             * @author Canaan
             * @date 2019/8/20 16:16
             */
            pushInventoryHandle() {
                this.$router.push({
                    path: '/pushInventoryForm',
                    query: {
                        materialId: this.material.id
                    }
                });
            }
        },
        watch: {},
        filters: {},
        beforeDestroy() {

        }
    }
</script>

<style scoped>

</style>
